Provide fast write emulation path to release shadow lock.
authorKeir Fraser <keir.fraser@citrix.com>
Fri, 15 Feb 2008 12:33:11 +0000 (12:33 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Fri, 15 Feb 2008 12:33:11 +0000 (12:33 +0000)
commitce7887f778d9c605a3a6f176cb63d67967d63912
tree163c30308fb06d98b1cf9fead7bc7361c11905ae
parenta3736b8b9fa019d96d29da5a823603c45e6ca50c
Provide fast write emulation path to release shadow lock.

Basically we can consider shadow fault logic into two parts,
with 1st part to cover logistic work like validating guest
page table or fix shadow table, and the 2nd part for write
emulation.

However there's one scenario we can optimize to skip the
1st part. For previous successfully emulated virtual frame,
it's very likely approaching at write emulation logic again
if next adjacent shadow fault is hitting same virtual frame.
It's wasteful to re-walk 1st part which is already covered
by last shadow fault. In this case, actually we can jump to
emulation code early, without any lock acquisition until
final shadow validation for write emulation. By perfc counts
on 64bit SMP HVM guest, 89% of total shadow write emulation
are observed falling into this fast path when doing kernel
build in guest.

Signed-off-by Kevin Tian <kevin.tian@intel.com>
xen/arch/x86/mm/shadow/common.c
xen/arch/x86/mm/shadow/multi.c
xen/arch/x86/mm/shadow/private.h
xen/include/asm-x86/domain.h
xen/include/asm-x86/perfc_defn.h